﻿
@{
    ViewBag.Title = "Staff";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var Cols = new Zephyr.Models.sys_roleMenuColumnMapService().GetCurrentUserMenuColumns();
}

@section scripts{
    <script src="/Content/js/viewModel/com.viewModel.search.js"></script>
    <script type="text/javascript">
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = function(){ 
            com.viewModel.search.apply(this,arguments);
        }
        ko.bindingViewModel(new viewModel(data));
    </script>
}

    @Html.RenderToolbar()

    <div class="container_12" style="position:relative;">
        <div class="grid_1 lbl">UserName</div>
        <div class="grid_2 val"><input type="text" data-bind="value:form.UserName" class="z-txt " /></div>
        <div class="grid_1 lbl">EmployeeName</div>
        <div class="grid_2 val"><input type="text" data-bind="value:form.EmployeeName" class="z-txt " /></div>
        <div class="grid_1 lbl">DisplayName</div>
        <div class="grid_2 val"><input type="text" data-bind="value:form.DisplayName" class="z-txt " /></div>
        
        <div class="clear"></div>
        
        <div class="grid_1 lbl">UserType</div>
        <div class="grid_2 val"><input type="text" data-bind="datasource:data.dataSource.dsUserType,comboboxValue:form.UserType" class="z-txt easyui-combobox" /></div>
        <div class="grid_1 lbl">EmployeeCode</div>
        <div class="grid_2 val"><input type="text" data-bind="value:form.EmployeeCode" class="z-txt " /></div>
        <div class="grid_1 lbl">Birthday</div>
        <div class="grid_2 val"><input type="text" data-bind="value:form.Birthday" class="z-txt easyui-daterange" /></div>

        <div class="clear"></div>

        <div class="prefix_9" style="position:absolute;top:5px;height:0;">  
            <a id="a_search" href="#" class="buttonHuge button-blue" data-bind="click:searchClick" style="margin:0 15px;">查询</a> 
            <a id="a_reset"  href="#" class="buttonHuge button-blue" data-bind="click:clearClick">清空</a>
        </div>
    </div>
 
    <table data-bind="datagrid:grid">
            <thead>  
            <tr>  
                <th field="EMPSID"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"EMPSID") >EMPSID</th>
                <th field="DEPTID"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"DEPTID") >DEPTID</th>
                <th field="UserName"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"UserName") >UserName</th>
                <th field="EmployeeName"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"EmployeeName") >EmployeeName</th>
                <th field="DisplayName"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"DisplayName") >DisplayName</th>
                <th field="RealNameSpell"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"RealNameSpell") >RealNameSpell</th>
                <th field="UserType"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"UserType") >UserType</th>
                <th field="EmployeeCode"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"EmployeeCode") >EmployeeCode</th>
                <th field="Gender"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"Gender") >Gender</th>
                <th field="Birthday"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"Birthday") >Birthday</th>
                <th field="CreateOn"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"CreateOn") >CreateOn</th>
                <th field="CreateBy"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"CreateBy") >CreateBy</th>
                <th field="ModifiedOn"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"ModifiedOn") >ModifiedOn</th>
                <th field="ModifiedBy"    sortable="true" align="left"    width="80"     @Html.HideColumn(Cols,"ModifiedBy") >ModifiedBy</th>
            </tr>                            
        </thead>      
    </table>
 
